package com.hankol.message.api

import com.baselibrary.base.BasicListBean
import com.baselibrary.net.result.HttpResult
import com.hankol.message.bean.*
import io.reactivex.Observable
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST

interface MessageApi {

    //点赞和收藏列表
    @FormUrlEncoded
    @POST("web/support/v1.19.2/supportAndFavoritePager")
    fun reqLikeAndCollectList(@Field("token") token: String, @Field("page") page: Int, @Field("size") pageSize: Int): Observable<HttpResult<BasicListBean<LikeAndCollectBean>>>


    //评论我的 列表
    @FormUrlEncoded
    @POST("web/comment/v1.19.2/commentOnMy")
    fun reqCommentMeList(@Field("token") token: String, @Field("page") page: Int, @Field("size") pageSize: Int): Observable<HttpResult<BasicListBean<CommentMeBean>>>


    //广播-分页 系统消息 列表
    @FormUrlEncoded
    @POST("msg/push/v1.19.2/msg/list")
    fun reqSystemMsgList(@Field("token") token: String, @Field("msgPushTypeId") msgPushTypeId: Int, @Field("cursor") cursor: String, @Field("size") pageSize: Int): Observable<HttpResult<BasicListBean<BroadcastMsgBean>>>

    //关注人数，粉丝人数
    @FormUrlEncoded
    @POST("focusFans/getFansCount")
    fun reqAttentiveNum(@Field("token") token: String): Observable<HttpResult<AttentiveNum>>

    //广播-设置消息为已读
    @FormUrlEncoded
    @POST("msg/push/v1.19.2/broadcast/read")
    fun reqBroadcastRead(@Field("token") token: String): Observable<HttpResult<Boolean>>

    //评论我的列表、赞和收藏列表、新增粉丝列表，3个接口的未读数统计
    @FormUrlEncoded
    @POST("msg/push/v1.19.2/unreadCount")
    fun reqUnReadCnt(@Field("token") token: String): Observable<HttpResult<UnReadCntBean>>

    //系统消息类型列表
    @FormUrlEncoded
    @POST("msg/push/type/v1.19.2/getSysMsgList")
    fun reqGetSysMsgList(@Field("token") token: String): Observable<HttpResult<List<GetSysMsgListBean>>>

}